{extends file="./main.tpl"}
{block name=head}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="./js/jquery.js" type="text/javascript"></script>
<script src="./js/jquery.dataTables.js" type="text/javascript"></script>
<style type="text/css">
  @import "./css/demo_table_jui.css";
  @import "./themes/ui-lightness/jquery-ui-1.8.4.custom.css";
  
  *{
      font-family: arial;
  }
  
  .loanList
  {
    font-size:15px;
  }
</style>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
  //http://datatables.net/release-datatables/examples/advanced_init/footer_callback.html
  $('#datatables').dataTable({
    "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay) {
    		
      var iTotal = 0;
      /* Modify the footer row to match what we want */
      var nCells = nRow.getElementsByTagName('th');
    },
    "sPaginationType":"full_numbers",
    "aaSorting":[[2, "desc"]],
    "bJQueryUI":true
  });
})
//function printFunction(loanIdVar)
//{
//	var loanId = loanIdVar ;
//  window.open("billListSimple2.php?loanId="+loanId);
//  return true;
//}
</script>
{/block}
{block name=body}
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<div>
<h1 align="center"><font size="8px">Loan List</font></h1>
<table id="datatables" class="display">
  <thead>
    <tr class="loanList">
    	<th align="left">Print</th>
    	<th align="left">Delete</th>
      <th>Add On</th>
      <th>Loan No</th>
      <th>Perent Loan No</th>
      <th>Account No</th>
      <th>Party</th>
      <th>Value</th>
      <th>Pending Amount</th>
      <th>Total Loan On This Item :</th>
      <th>Item</th>
      <th>Weight</th>
      <th>Item Location</th>
      <th>Date</th>
      <th>Monthly Interest %</th>
      <th>Monthly Interest Rs</th>
      <th>Item Image</th>
    </tr>
  </thead>
  <tbody>
    {section name=rec loop=$loanArray}
    <tr style="font-size:18px;">
      <!--td><a href="billListSimple.php?loanId={$loanArray[rec].loanId}" target="_blank" onclick="return printFunction({$loanArray[rec].loanId});">Print</a></td-->
      <td>
      	<a href="billListSimple.php?loanId={$loanArray[rec].loanId}" target="_blank">Print</a>
      </td>
      <td><a onclick="return confirm('Are You Sure To Delete??');" href="loanDelete.php?loanId={$loanArray[rec].loanId}"><img src="./images/deleteIcon.png" width="25px" height="25px"></a></td>
      <td nowrap ><a href="loanAddOn.php?createFrom={$loanArray[rec].loanId}">Add On</a></td>
      <td align="center">{$loanArray[rec].loanId}</td>
      <td align="center">{$loanArray[rec].addOnLoanId}</td>
      <td align="center">{$loanArray[rec].loanVarNo}</td>
      <td>{$loanArray[rec].partyName}</td>
      <td align="right">{$loanArray[rec].value}</td>
      <td align="right">{$loanArray[rec].loanAmount}</td>
      <td align="right">{$loanArray[rec].totalLoanOnThisItem}</td>
      <td align="center">{$loanArray[rec].itemName}</td>
      <td align="right">{$loanArray[rec].weight}</td>
      <td align="center">{$loanArray[rec].itemlocationName}</td>
      <td nowrap >{$loanArray[rec].loanDate}</td>
      <td align="right">{if $loanArray[rec].monthlyInterest == 0}Manualy{else}{$loanArray[rec].monthlyInterest}{/if}</td>
      <td align="right">{$loanArray[rec].monthlyInterestRs}</td>
      <td><img src="./loanUplodeadImages/{$loanArray[rec].photo}" width="70px" height="50px"></td>
    </tr> 
    {/section} 
  </tbody>
  <tfoot style="font-size:18px;">
		<tr>
		</tr>
	</tfoot>
</table>
</div>
{/block}